import request from '@/utils/request'

// 获取生成银行数据列表
export function queryGenerateBankDataPage(query) {
  return request({
    url: '/generateBankDataController/queryGenerateBankDataPage',
    method: 'get',
    params: query
  })
}

// 获取人员工资明细列表
export function queryPersonSalaryInfoPage(query) {
  return request({
    url: '/generateBankDataController/queryPersonSalaryInfoPage',
    method: 'get',
    params: query
  })
}

export function uploadBankData(data) {
  return request({
    url: '/generateBankDataController/uploadBankData',
    method: 'post',
    data
  })
}

export function regenerateBankData(data) {
  return request({
    url: '/generateBankDataController/regenerateBankData',
    method: 'post',
    data
  })
}

export function ungenerateBankData(data) {
  return request({
    url: '/generateBankDataController/ungenerateBankData',
    method: 'post',
    data
  })
}

export function generateBankData(data) {
  return request({
    url: '/generateBankDataController/generateBankData',
    method: 'post',
    data
  })
}

export function verifyFileState() {
  return request({
    url: '/generateBankDataController/verifyFileState',
    method: 'get'
  })
}

export function generateAndExportBankData() {
  return request({
    url: '/generateBankDataController/generateAndExportBankData',
    responseType: 'blob',
    method: 'get'
  })
}
// 进度条数据
export function getProgress(query) {
  return request({
    url: '/generateBankDataController/queryGenerateBankGetMessage',
    method: 'get',
    params: query
  })
}
export function getProgressSalary(query) {
  return request({
    url: '/generateBankDataController/queryGenerateBankGetMessage',
    method: 'get',
    params: query
  })
}
export function makeSalaryDataAsync(data) {
  return request({
    url: '/generateSalaryDataController/makeSalaryDataAsync',
    method: 'post',
    data
  })
}
export function getPaymentPercent(query) {
  return request({
    url: '/generateSalaryDataController/getPaymentPercent',
    method: 'get',
    params: query
  })
}
// 撤销生成银行文件
export function revokeGenerate() {
  return request({
    url: '/generateSalaryDataController/revokeGenerate',
    method: 'post'
  })
}
